package com.ecoolex.hotel.saas.ws;

import java.math.BigDecimal;

import com.ecoolex.framework.common.exception.BizException;
import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.hotel.saas.entity.SalesUser;
import com.ecoolex.hotel.saas.entity.SalesUserWallet;
import com.ecoolex.hotel.saas.entity.SalesUserWalletDetail;
import com.ecoolex.hotel.saas.entity.SalesUserWalletWithdrawalApply;
import com.ecoolex.hotel.saas.pojo.QuerySalesUserDTO;
import com.ecoolex.hotel.saas.pojo.QuerySalesUserWalletWithdrawalApplyDTO;

public interface SalesUserService {

	SalesUser getSalesUser(Integer id);
	
	Pagination<SalesUser> querySalesUser(QuerySalesUserDTO query, Page page);
	
	SalesUser getByUserIdAndStoreId(Integer userId, Integer storeId);
	
	Long countByDepartmentId(Integer departmentId);
	
	SalesUser addSalesUser(SalesUser add, String createUser) throws BizException;
	
	SalesUser editSalesUser(SalesUser edit, String updateUser) throws BizException;
	
	SalesUserWallet getSalesUserWalletByUserIdAndStoreId(Integer storeId, Integer userId);
	
	SalesUserWallet getSalesUserWallet(Integer walletId);
	
	Pagination<SalesUserWalletDetail> queryByWalletId(Integer walletId, Page page);
	
	SalesUserWalletWithdrawalApply getSalesUserWalletWithdrawalApply(Integer applyId);
	
	Pagination<SalesUserWalletWithdrawalApply> querySalesUserWalletWithdrawalApply(Integer storeId, Integer userId, Page page);
	
	SalesUserWalletWithdrawalApply submitApply(Integer walletId, BigDecimal applyAmt, String createUser) throws BizException;
	
	Pagination<SalesUserWalletWithdrawalApply> query(QuerySalesUserWalletWithdrawalApplyDTO query, Page page);
	
	SalesUserWalletWithdrawalApply agree(SalesUserWalletWithdrawalApply apply, String updateUser) throws BizException;
	
	SalesUserWalletWithdrawalApply refuse(SalesUserWalletWithdrawalApply apply, String updateUser) throws BizException;
}
